<?php
class Animal
{
  /*
   * while creating any object that function will call automatically
   * */
  public function __construct() {
    echo "<br>I am in parent constructor<br>\n\n";
    $this->created = date('Y-m-d');
  }

  /*
  * Default destructor of any class, that will call automatically
  * */
  public function __destruct() {
    echo '<br>I am in destrructor in ANIMAL<br>';
    $this->created = '';
  }

}

class Penguin extends Animal
{
  public $created = "vikas";
  //function penguin()
  //{
    //echo "I am in penguin constructor--1\n\n";
  //}

  //function __construct()
  //{
    //echo "I am in penguin constructor--2\n\n";
    //$this->created = "prakash";
  //}
}

$obj = new Penguin;
//echo $obj->created;
